package com.ruoyi.lyy.service.impl;

import com.ruoyi.lyy.domain.vo.CouponVO;
import com.ruoyi.lyy.mapper.CouponMapper;
import com.ruoyi.lyy.service.ICouponService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author YueYang
 * Created on 2025/11/17 21:41
 * @version 1.0
 */
@Slf4j
@Service
@RequiredArgsConstructor
public class CouponServiceImpl implements ICouponService {
    private final CouponMapper couponMapper;

    /**
     * 根据用户id查询优惠券信息
     *
     * @param uid 用户id
     * @return 优惠券信息
     */
    @Override
    public List<CouponVO> getCouponInfoByUid(Integer uid) {
        log.info("根据用户id查询优惠券信息,用户id为{}", uid);
        return couponMapper.selectCouponInfoByUid(uid);
    }
}
